-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature inversion task (#81) に関わるPR内のテストコードの作成 #85
Feature inversion task (#81) に関わるPR内のテストコードの作成 #85
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
いくつかマイナーコメントをいれました
Co-authored-by: Yoshihiro Nagano <[email protected]>
Co-authored-by: Yoshihiro Nagano <[email protected]>
Co-authored-by: Yoshihiro Nagano <[email protected]>
def receive(self, value): | ||
return value.lower() | ||
|
||
class TestDomain(unittest.TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much for the implementations of the test cases for the domain module. I think basically the current implementations already cover the minimum test cases. But I would apppreciate it if you could add test cases which check the invertibility of the function domain.send . domain.receive
over several example inputs including edge cases. I anticipate the tests like following:
domain = ... # instantiate some subclass of the reversible domain class
input_candidates = [...] # candidate of possible inputs including typical & edge-case examples
for x in input_candidates:
assert x == domain.send(domain.receive(x))
assert x == domain.receive(domain.send(x))
self.assertTrue(len(self.inversion_task._callback_handler._callbacks) > 0) | ||
|
||
# test for process | ||
self.assertEqual(generated_image.shape, (1, 7 * 7 * 3)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we should first test the type of the return value generated_image
otherwise we cannot guarantee it has the instance variable like shape
Co-authored-by: Yoshihiro Nagano <[email protected]>
Co-authored-by: Yoshihiro Nagano <[email protected]>
Co-authored-by: Yoshihiro Nagano <[email protected]>
Co-authored-by: Yoshihiro Nagano <[email protected]>
Co-authored-by: Yoshihiro Nagano <[email protected]>
Co-authored-by: Yoshihiro Nagano <[email protected]>
Co-authored-by: Yoshihiro Nagano <[email protected]>
latent / task (core/inversion) / domain / datasetのテストケースの実装
encoder / generatorについてdomainまわりのパターンのテストを追加
latent
task core
task inversion
domain core
domain image_domain
domain feature_domain
dataset (相談の上ひとまずなし)
encoder
generator